import java.util.Scanner;

public class Ex3_1{
	public static void main(String[] args){
		Scanner input = new Scanner(System.in);
		System.out.print("Enter a, b, c: ");
		double a = input.nextDouble();
		double b = input.nextDouble();
		double c = input.nextDouble();
		double discriminant = b*b-4*a*c;
		if (discriminant < 0){
			System.out.println("The equation has no real roots.");
			System.exit(0);
		}
		else if (discriminant == 0){
			double root = -b / (2*a);
			System.out.printf("The root is %f\n", root);
		}
		else {
			double root1 = (-b + Math.pow(discriminant, 0.5)) / (2*a);
			double root2 = (-b - Math.pow(discriminant, 0.5)) / (2*a);
			System.out.printf("The roots are %f and %f\n", root1, root2);
		}
	}
}